﻿
using Consul;
using Grpc.Core;
using Grpc.Health.V1;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Hosting;
using System.Xml.Linq;

namespace NetCore6Api.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class HealthController : ControllerBase
    {
        private string host = "localhost";
        private int port = 5246;
        [HttpGet]
        public string Get()
        {
            //Channel channel = new(host, port, ChannelCredentials.Insecure);
            //var cli = Health.(channel);
            //HealthCheckRequest args = new HealthCheckRequest() { Name = name };
            //HelloReply res = cli.SayHello(args);
            //return res?.Message ?? "no";
            return "ok";
        }
    }
}
